#ifndef __COMMAND_H
#define __COMMAND_H

#include    <stdio.h>
#include	<string.h>
#include	<arpa/inet.h>
#include	<stdint.h>

#include    <network/Epollor.h>
#include	<thread/Singleton.h>
#include    <thread/TaskManager.h>

using namespace std;
using namespace MyUtil;

/**
 * @class  CommandFactory
 * @brief  
 * @author LiuJkun
 * @date   10/03/09
 */
class CommandFactory : public MyUtil::Singleton<CommandFactory>
{
    public:

        // ====================  LIFECYCLE     =======================================
        CommandFactory ();                             // constructor
        TaskPtr create(const PacketPtr& packet);

        // ====================  ACCESSORS     =======================================

        // ====================  MUTATORS      =======================================

        // ====================  OPERATORS     =======================================

    protected:
        // ====================  DATA MEMBERS  =======================================

    private:
        // ====================  DATA MEMBERS  =======================================
        int32_t _m_iOpenCount;
        int32_t _m_iCloseCount;
        int32_t _m_iPacketLength;
        int32_t _m_iSummaryType;
        int32_t _m_iSubType;

}; 

#endif
